package com.zyd.mappers;

import com.zyd.io.model.MenuEntity;
import com.zyd.io.model.MenuEntityExample;
import com.zyd.io.model.MenuEntityKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface MenuEntityMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_menu
     *
     * @mbg.generated Sat Oct 27 10:06:38 CST 2018
     */
    @SelectProvider(type=MenuEntitySqlProvider.class, method="countByExample")
    long countByExample(MenuEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_menu
     *
     * @mbg.generated Sat Oct 27 10:06:38 CST 2018
     */
    @DeleteProvider(type=MenuEntitySqlProvider.class, method="deleteByExample")
    int deleteByExample(MenuEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_menu
     *
     * @mbg.generated Sat Oct 27 10:06:38 CST 2018
     */
    @Delete({
        "delete from zydzn_menu",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(MenuEntityKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_menu
     *
     * @mbg.generated Sat Oct 27 10:06:38 CST 2018
     */
    @Insert({
        "insert into zydzn_menu (id, ts, dr, ",
        "funcname, parentid, ",
        "isfloder, urlaction, ",
        "sortno, isuchange, ",
        "icon, isoperate, ishavearea)",
        "values (#{id,jdbcType=VARCHAR}, #{ts,jdbcType=CHAR}, #{dr,jdbcType=INTEGER}, ",
        "#{funcname,jdbcType=VARCHAR}, #{parentid,jdbcType=VARCHAR}, ",
        "#{isfloder,jdbcType=CHAR}, #{urlaction,jdbcType=VARCHAR}, ",
        "#{sortno,jdbcType=INTEGER}, #{isuchange,jdbcType=CHAR}, ",
        "#{icon,jdbcType=VARCHAR}, #{isoperate,jdbcType=CHAR}, #{ishavearea,jdbcType=CHAR})"
    })
    int insert(MenuEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_menu
     *
     * @mbg.generated Sat Oct 27 10:06:38 CST 2018
     */
    @InsertProvider(type=MenuEntitySqlProvider.class, method="insertSelective")
    int insertSelective(MenuEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_menu
     *
     * @mbg.generated Sat Oct 27 10:06:38 CST 2018
     */
    @SelectProvider(type=MenuEntitySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="ts", property="ts", jdbcType=JdbcType.CHAR),
        @Result(column="dr", property="dr", jdbcType=JdbcType.INTEGER),
        @Result(column="funcname", property="funcname", jdbcType=JdbcType.VARCHAR),
        @Result(column="parentid", property="parentid", jdbcType=JdbcType.VARCHAR),
        @Result(column="isfloder", property="isfloder", jdbcType=JdbcType.CHAR),
        @Result(column="urlaction", property="urlaction", jdbcType=JdbcType.VARCHAR),
        @Result(column="sortno", property="sortno", jdbcType=JdbcType.INTEGER),
        @Result(column="isuchange", property="isuchange", jdbcType=JdbcType.CHAR),
        @Result(column="icon", property="icon", jdbcType=JdbcType.VARCHAR),
        @Result(column="isoperate", property="isoperate", jdbcType=JdbcType.CHAR),
        @Result(column="ishavearea", property="ishavearea", jdbcType=JdbcType.CHAR)
    })
    List<MenuEntity> selectByExample(MenuEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_menu
     *
     * @mbg.generated Sat Oct 27 10:06:38 CST 2018
     */
    @Select({
        "select",
        "id, ts, dr, funcname, parentid, isfloder, urlaction, sortno, isuchange, icon, ",
        "isoperate, ishavearea",
        "from zydzn_menu",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="ts", property="ts", jdbcType=JdbcType.CHAR),
        @Result(column="dr", property="dr", jdbcType=JdbcType.INTEGER),
        @Result(column="funcname", property="funcname", jdbcType=JdbcType.VARCHAR),
        @Result(column="parentid", property="parentid", jdbcType=JdbcType.VARCHAR),
        @Result(column="isfloder", property="isfloder", jdbcType=JdbcType.CHAR),
        @Result(column="urlaction", property="urlaction", jdbcType=JdbcType.VARCHAR),
        @Result(column="sortno", property="sortno", jdbcType=JdbcType.INTEGER),
        @Result(column="isuchange", property="isuchange", jdbcType=JdbcType.CHAR),
        @Result(column="icon", property="icon", jdbcType=JdbcType.VARCHAR),
        @Result(column="isoperate", property="isoperate", jdbcType=JdbcType.CHAR),
        @Result(column="ishavearea", property="ishavearea", jdbcType=JdbcType.CHAR)
    })
    MenuEntity selectByPrimaryKey(MenuEntityKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_menu
     *
     * @mbg.generated Sat Oct 27 10:06:38 CST 2018
     */
    @UpdateProvider(type=MenuEntitySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MenuEntity record, @Param("example") MenuEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_menu
     *
     * @mbg.generated Sat Oct 27 10:06:38 CST 2018
     */
    @UpdateProvider(type=MenuEntitySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MenuEntity record, @Param("example") MenuEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_menu
     *
     * @mbg.generated Sat Oct 27 10:06:38 CST 2018
     */
    @UpdateProvider(type=MenuEntitySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MenuEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_menu
     *
     * @mbg.generated Sat Oct 27 10:06:38 CST 2018
     */
    @Update({
        "update zydzn_menu",
        "set ts = #{ts,jdbcType=CHAR},",
          "dr = #{dr,jdbcType=INTEGER},",
          "funcname = #{funcname,jdbcType=VARCHAR},",
          "parentid = #{parentid,jdbcType=VARCHAR},",
          "isfloder = #{isfloder,jdbcType=CHAR},",
          "urlaction = #{urlaction,jdbcType=VARCHAR},",
          "sortno = #{sortno,jdbcType=INTEGER},",
          "isuchange = #{isuchange,jdbcType=CHAR},",
          "icon = #{icon,jdbcType=VARCHAR},",
          "isoperate = #{isoperate,jdbcType=CHAR},",
          "ishavearea = #{ishavearea,jdbcType=CHAR}",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MenuEntity record);
}